import { render, createVNode, ref } from 'vue';
import view from './index.vue';

export let setupIsShow = ref(false);

export function createSetupView() {
	function close() {
		setupIsShow.value = false;
		render(null, document.body);
	}

	if (setupIsShow.value) {
		close();
	} else {
		setupIsShow.value = true;

		const VNode = createVNode(view, {
			close,
		});

		render(VNode, document.body);
	}
}
